/*
 *  Copyright (C) 2010 glauco
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.common.abstracts;

import org.balisunrise.common.SelectionPanelField;

/**
 *
 * @author Glauco
 */
public abstract class AbstractSelectionAction extends AbstractVisualizable{

    protected Class searchClass;
    protected String searchAlias;
    protected String notFoundMessage;
    protected SelectionPanelField selectionPanelField;
    public static final String PROP_SEARCHCLASS = "searchClass";
    public static final String PROP_SEARCHALIAS = "searchAlias";
    public static final String PROP_NOTFOUNDMESSAGE = "notFoundMessage";
    public static final String PROP_SELECTIONPANELGROUP = "selectionPanelField";

    /**
     * Get the value of selectionPanelField
     *
     * @return the value of selectionPanelField
     */
    public SelectionPanelField getSelectionPanelField() {
        return selectionPanelField;
    }

    /**
     * Set the value of selectionPanelField
     *
     * @param selectionPanelField new value of selectionPanelField
     */
    public void setSelectionPanelField(SelectionPanelField selectionPanelField) {
        SelectionPanelField oldSelectionPanelField = this.selectionPanelField;
        this.selectionPanelField = selectionPanelField;
        changeSupport.firePropertyChange(PROP_SELECTIONPANELGROUP,
                oldSelectionPanelField, selectionPanelField);
    }

    /**
     * Get the value of notFoundMessage
     *
     * @return the value of notFoundMessage
     */
    public String getNotFoundMessage() {
        return notFoundMessage;
    }

    /**
     * Set the value of notFoundMessage
     *
     * @param notFoundMessage new value of notFoundMessage
     */
    public void setNotFoundMessage(String notFoundMessage) {
        String oldNotFoundMessage = this.notFoundMessage;
        this.notFoundMessage = notFoundMessage;
        changeSupport.firePropertyChange(PROP_NOTFOUNDMESSAGE,
                oldNotFoundMessage, notFoundMessage);
    }

    /**
     * Get the value of searchAlias
     *
     * @return the value of searchAlias
     */
    public String getSearchAlias() {
        return searchAlias;
    }

    /**
     * Set the value of searchAlias
     *
     * @param searchAlias new value of searchAlias
     */
    public void setSearchAlias(String searchAlias) {
        String oldSearchAlias = this.searchAlias;
        this.searchAlias = searchAlias;
        changeSupport.firePropertyChange(PROP_SEARCHALIAS,
                oldSearchAlias, searchAlias);
    }

    /**
     * Get the value of searchClass
     *
     * @return the value of searchClass
     */
    public Class getSearchClass() {
        return searchClass;
    }

    /**
     * Set the value of searchClass
     *
     * @param searchClass new value of searchClass
     */
    public void setSearchClass(Class searchClass) {
        Class oldSearchClass = this.searchClass;
        this.searchClass = searchClass;
        changeSupport.firePropertyChange(PROP_SEARCHCLASS,
                oldSearchClass, searchClass);
    }

}
